<template>
	<view class="qr-code-box">
		<view class="title">
			{{title}}
		</view>
		<image @click="handBigImg(imgUrl)" class="code-img" :src="imgUrl" mode=""></image>
		<view class="content-text" v-if="content">
			{{content}}
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			content: {
				type: String,
				default: ''
			},
			title: {
				type: String,
				default: '活动二维码'
			},
			imgUrl:{
				type:String,
				default:'http://111.229.30.99:9000/image/codeimg.png'
			}
		},
		data() {
			return {

			};
		},
		methods:{
			handBigImg(url){
				uni.previewImage({
					urls:[url]
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.qr-code-box {
		width: 100%;
		text-align: center;

		.title {
			color: $bs-color-title;
			font-size: 36rpx;
			margin-bottom: 30rpx;

		}

		.code-img {
			width: 266rpx;
			height: 266rpx;
			margin-bottom: 30rpx;
		}
	}
</style>
